import {executeInCurrentTab} from "~background/utils";

const showHighlight = (highlightId) => {
  function contentScriptShowHighlight(highlightId) { // eslint-disable-line no-shadow
    if (window.top !== window.self) return; // JM：iframe调用检查
    console.log("abcdefg");
    window.highlighterAPI.highlightText.show(highlightId);
  }

  executeInCurrentTab({ func: contentScriptShowHighlight, args: [highlightId] });
}

export default showHighlight;
